/*=+--+=#=+--     Unmanned Aerial System Management Software      --+=#=+--+=#*\
|          Copyright (C) 2011 Regents of the University of Colorado.           |
|                             All Rights Reserved.                             |

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as
     published by the Free Software Foundation.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

            Jack Elston                       Cory Dixon                        
|           elstonj@colorado.edu              dixonc@colorado.edu              |
|                                                                              |
\*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*/

/*!
  \file exampleDaemon.h
	\brief header file for daemon

                    \author Jack Elston
             $Date: 2006/10/05 00:20:45 $
*/
#ifndef __EXAMPLEDAEMON_H
#define __EXAMPLEDAEMON_H

#include "String.h"
#include "shmStruct.h"

  /*<-------Defines--------->*/
    /*! \brief seconds to sleep in main loop. */
    #define RUN_RATE 1.0
  /*<------End Defines------>*/

  /*<---Global Variables---->*/
    /*! \brief running state of daemon. */
    volatile bool running = true;
    /*! \brief determines level of output to user. */
    bool verbose = false;
    bool logging = false;
    String logDir;
    /*! \brief determines vehicle identification number. */
    String vehicleID;

    in_addr netmask;
    in_addr internal_subnet;  //remove later
		
		Client * js_client = NULL;
  /*<-End Global Variables-->*/

/*!
  \brief prints the command line usage of the daemon.
  \param name the name of the binary
	\pre none
	\post prints the usage and invokes ExampleDaemon_Status
 */
void ExampleDaemon_Usage(char *);

/*!
  \brief prints status of daemon
	\pre input and output ports specified for each network connection
	\post prints out port status of daemon
 */
void ExampleDaemon_Status();

/*! 
  \brief prints out error messages
  \param errstring string containing error
	\pre error has been defined
	\post error printed out to stderr
 */
void ExampleDaemon_Error(char * errstring);

/*!
  \brief function called to terminate threads and exit program
  \param signal signal caught that invoked function
	\pre signal from system has been caught and passed to function
	\post threads have been stopped
 */
void ExampleDaemon_Exit( int signal );

#endif //define

/*!
  \mainpage Reference Diagrams
  \section systemDiagram System Diagram
 */
